<?php
include "product_ad.class.php";
?>
<meta charset="UTF-8">
<head>
<script type="text/javascript" src="../pic/editor_config.js"></script>
<script type="text/javascript" src="../pic/editor_all_min.js"></script>
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
<link rel="stylesheet" href="../pic/themes/default/ueditor.css">
<!--                       CSS                       -->
<!-- Reset Stylesheet -->
<link rel="stylesheet" href="resources/css/reset.css" type="text/css" media="screen" />
<!-- Main Stylesheet -->
<link rel="stylesheet" href="resources/css/style.css" type="text/css" media="screen" />
<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
<link rel="stylesheet" href="resources/css/invalid.css" type="text/css" media="screen" />
<!--                       Javascripts                       -->
<!-- jQuery -->
<!-- jQuery Configuration -->
<script type="text/javascript" src="resources/scripts/simpla.jquery.configuration.js"></script>
<!-- Facebox jQuery Plugin -->
<script type="text/javascript" src="resources/scripts/facebox.js"></script>
<!-- jQuery WYSIWYG Plugin -->
<script type="text/javascript" src="resources/scripts/jquery.wysiwyg.js"></script>
<!-- jQuery Datepicker Plugin -->
<script type="text/javascript" src="resources/scripts/jquery.datePicker.js"></script>
<script type="text/javascript" src="resources/scripts/jquery.date.js"></script>
<style>
	.path img{
		width:200px;
	}
</style>
</head>
<body style="background:none; margin:30px 30px 0 0;">
	<div class="content-box-header">
        <h3>新增商品</h3>
        <div class="clear"></div>
      </div>
      
	  <form action="../content/upload.php" method="POST" enctype="multipart/form-data" target="hidden_frame">
		<br><p>
		<label>首页推荐图：</label>
		<input type="file" name="up_image" class="up_image">
		<iframe name='hidden_frame' id="hidden_frame" style="border:none;display:none"></iframe>
		<input type="hidden" name="field" value="path0">
		<input type="submit" class="button up_submit" name="save" value="上传"></p>
	   </form>
	   <div class="path path0"><?php echo $path[0];?></div>
	   
	   <form action="../content/upload.php" method="POST" enctype="multipart/form-data" target="hidden_frame">
		<br><p>
		<label>主图1：</label>
		<input type="file" name="up_image" class="up_image">
		<iframe name='hidden_frame' id="hidden_frame" style="border:none;display:none"></iframe>
		<input type="hidden" name="field" value="path1">
		<input type="submit" class="button up_submit" name="save" value="上传"></p>
	   </form>
	   <div class="path path1"><?php echo $path[1];?></div>
	   
	   <form action="../content/upload.php" method="POST" enctype="multipart/form-data" target="hidden_frame">
		<br><p>
		<label>主图2：</label>
		<input type="file" name="up_image" class="up_image">
		<iframe name='hidden_frame' id="hidden_frame" style="border:none;display:none"></iframe>
		<input type="hidden" name="field" value="path2">
		<input type="submit" class="button up_submit" name="save" value="上传"></p>
	   </form>
	   <div class="path path2"><?php echo $path[2];?></div>
	   
	   <form action="../content/upload.php" method="POST" enctype="multipart/form-data" target="hidden_frame">
		<br><p>
		<label>主图3：</label>
		<input type="file" name="up_image" class="up_image">
		<iframe name='hidden_frame' id="hidden_frame" style="border:none;display:none"></iframe>
		<input type="hidden" name="field" value="path3">
		<input type="submit" class="button up_submit" name="save" value="上传"></p>
	   </form>
	   <div class="path path3"><?php echo $path[3];?></div>
	   
	   <form action="../content/upload.php" method="POST" enctype="multipart/form-data" target="hidden_frame">
		<br><p>
		<label>主图4：</label>
		<input type="file" name="up_image" class="up_image">
		<iframe name='hidden_frame' id="hidden_frame" style="border:none;display:none"></iframe>
		<input type="hidden" name="field" value="path4">
		<input type="submit" class="button up_submit" name="save" value="上传"></p>
	   </form>
	   <div class="path path4"><?php echo $path[4];?></div>
	   
	   <form action="../content/upload.php" method="POST" enctype="multipart/form-data" target="hidden_frame">
		<br><p>
		<label>主图5：</label>
		<input type="file" name="up_image" class="up_image">
		<iframe name='hidden_frame' id="hidden_frame" style="border:none;display:none"></iframe>
		<input type="hidden" name="field" value="path5">
		<input type="submit" class="button up_submit" name="save" value="上传"></p>
	   </form>
	   <div class="path path5"><?php echo $path[5];?></div>
	   
		<form method="POST">
			<input type="hidden" id="path0" name="path[]" value="<?php echo $img[0];?>">
			<input type="hidden" id="path1" name="path[]" value="<?php echo $img[1];?>">
			<input type="hidden" id="path2" name="path[]" value="<?php echo $img[2];?>">
			<input type="hidden" id="path3" name="path[]" value="<?php echo $img[3];?>">
			<input type="hidden" id="path4" name="path[]" value="<?php echo $img[4];?>">
			<input type="hidden" id="path5" name="path[]" value="<?php echo $img[5];?>">
			<p><label>商品名：</label>
			<input class="text-input small-input" type="text" name="name" value="<?php echo $pram['name']?>"></p>
			<p><label>价格：</label>
			<input class="text-input small-input" type="text" name="price" value="<?php echo $pram['price']?>"></p>
			<p><label>简介：</label>
			<input class="text-input small-input" type="text" name="remark" value="<?php echo $pram['remark']?>"></p>
			<label>颜色：</label>
			<input class="text-input small-input" type="text" name="color" value="<?php echo $pram['color']?>"></p>
			<p><label>适合机型：</label>
			<input class="text-input small-input" type="text" name="model" value="<?php echo $pram['model']?>"></p>
			<!--编辑器 -->
			<p><label>简介：</label><script type="text/plain" id="info" style="width:800px" name="info"><?php echo $pram['info'];?>
				</script>
			<script type="text/javascript">
			    var editor = new baidu.editor.ui.Editor();
			    editor.render("info");
			</script></p>
			
			<p><label>规格：</label><script type="text/plain" id="specification" style="width:800px" name="specification"><?php echo $pram['specification'];?>
				</script>
			<script type="text/javascript">
			    var editor = new baidu.editor.ui.Editor();
			    editor.render("specification");
			</script></p>
			<p>	
			<select id="type">
			</select>
			<select id="type_1">
			</select>
			<select id="type_2" name="type">
			</select>
			</p>
			<br>
			<input type="submit" class="button"  value="保存" name="submit">
			<br>
			<br>
		</form>
</body>